package scala

import scala.collection.mutable

object TestSuite {

  def main(args: Array[String]): Unit = {
    executorAssign()

  }

  def executorAssign() = {

    (2 to 10).foreach(executorNum => {
      (2 to 4).foreach(queueSize => {
        val minExecutorNum = Math.max(Math.floor(1.0D * executorNum / queueSize) * 0.5D, 1.0D).toInt
        val maxExecutorNum = Math.max(executorNum - minExecutorNum, 1)

//        println(Math.floor(1.0D * executorNum / queueSize) * 0.5D)
        println(s"${executorNum}, ${queueSize}, min: ${minExecutorNum}, max: ${maxExecutorNum}")
      })
      println("**"*20)
    })
  }
}
